package 力扣._6953_判断能否拆分数组;

import java.util.List;

public class Solution {
    int sum(List<Integer> nums, int l, int r) {
        int sum = 0;
        for (int i = l; i <= r; i++) {
            sum += nums.get(i);
        }
        return sum;
    }

    int min_index(List<Integer> nums, int l, int r) {
        int min = nums.get(l);
        for (int i = l + 1; i <= r; i++) {
            if (nums.get(min) > nums.get(i))
                min = i;
        }
        return min;
    }

}
